{{extend 'layout.html'}}
{{if globals().get('message',False):}}
<div class="alert-message warning">
    {{=message}}
</div>
{{pass}}
<div class="row">
<div id="MusicPlayer" class="span5">
    <OBJECT ID="MediaPlayer1"
        CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
        CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#
        Version=5,1,52,701" STANDBY="Loading Microsoft Windows Media Player
        components..." TYPE="application/x-oleobject" width="280" height="46">
        <param name="fileName" value="http://hannibal.ucs.indiana.edu:8080/wiuxhigh.m3u">
        <param name="animationatStart" value="true">
        <param name="transparentatStart" value="true">
        <param name="autoStart" value="true">
        <param name="showControls" value="true">
        <param name="Volume" value="100">
        <embed type="application/x-mplayer2"
        pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
        src="http://hannibal.ucs.indiana.edu:8080/wiuxhigh.m3u" name="MediaPlayer1"
        width=280 height=46 autostart=0 showcontrols=1 volume=-300>
    </OBJECT>

    <form id="rating" class="form" method="POST"
      action={{"/radio/listen/%s"  % song.SongID}}>
        <fieldset>
          <select id="rating" name="rating" class="span2">

            {{if rating and rating.Score == 1: }}
               <option value="1" selected>1</option> 
            {{else:}}
                <option value="1">1</option>
                {{pass}}
            
            {{if rating and rating.Score == 2:}}
            <option value="2" selected>2</option> 
            {{else:}}
            <option value="2">2</option>
            {{pass}}

            {{if rating and rating.Score == 3:}}
            <option value="3" selected>3</option> 
            {{else:}}
            <option value="3">3</option> 
            {{pass}}

            {{if rating and rating.Score == 4: }}
            <option value="4" selected>4</option> 
            {{else:}}
            <option value="4">4</option>
            {{pass}}

            {{if rating and rating.Score == 5:}}
            <option value="5" selected>5</option> 
            {{else:}}
            <option value="5">5</option> 
            {{pass}}
            </select>
            <input class="btn primary" type="submit" value="rate"></input>
        </fieldset>
    </form>
</div>
<div class="span8">
    <ul class="pills" data-tabs="pills">
        <li class="active"><a href="#playing">Now Playing</a><li>
        <li><a href="#thedj">The DJ</a></li>
        <li><a href="#weather">Weather</a></li>
    </ul>
    <div class="pill-content">
        <div class="active" id="playing">
            <dl>
                <dt>Song</dt>
                <dd>{{=song.Name}}</dd>
                <dt>Artist</dt>
                <dd>{{=song.ArtistName}}</dd>
                <dt>Album</dt>
                <dd>{{=song.AlbumName}}</dd>
                <dt>Rating</dt>
                <dd>{{=song.AverageRating}}</dd>
            </dl>
        </div>
        <div id="thedj">
            <div class="row">
                <div class="span9">
                    <dl>
                        <dt>Name</dt>
                        <dd>goes here</dd>
                        <dt>Show Type</dt>
                        <dd>goes here</dd>
                        <dt>DJ since</dt>
                        <dd>goes here</dd>
                        <dt>About the DJ</dt>
                        <dd>the dj would have this in his/her profile</dd> 
                        <dt>Contact</dt>
                        <dd>(812) 855-WIUX <dd>
                    </dl>
                </div>
                <div class="span6 well">
                    maybe a picture would go here
                </div>
            </div>
        </div>
        <div id="weather">this is the weather</div>
    </div>
</div>
</div>
